package com.it.thread_safe;

public class DrawThread extends Thread {
    private Account acc;

    public DrawThread(Account acc,String name) {
        super(name);
        this.acc = acc;
    }

    @Override
    public void run() {
        // 取钱(小红和小明同时取钱，且都取10000)
        acc.drawMoney(10000);
    }
}
